﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using QLBH.DAO;
using QLBH.DTO;
using System.Data;

namespace QLBH.BLO
{
    class BLO_NghiepVu
    {
        DAO_NghiepVu dao_nv = new DAO_NghiepVu();
        public int Insert(NghiepVu nv)
        {
            try
            {
//                 DataTable idmax = Connection_Sql.GetDatatable("select max(MA_NGHV) from NGHIEPVU", false);
//                 int map = 1;
//                 if (idmax.Rows[0][0].ToString() == "")
//                 {
//                     nv.Ma_ngv = map.ToString();
//                 }
//                 else
//                 {
//                    nv.Ma_ngv = (int.Parse(idmax.Rows[0][0].ToString()) + 1).ToString();
//                 }
                return dao_nv.Insert(nv);
            }
            catch (System.Exception ex)
            {
                throw new Exception("Lỗi BLO Insert nghiep vu: " + ex.Message);
            }
        }

    }
}
